﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucAlaCarteMenu.ascx.cs" Inherits="Yumcha_UcControl_ucAlaCarteMenu" %>
<script type="text/javascript">
    $(function() {

        //cache the ticker
        var ticker = $("#ticker");

        //wrap dt:dd pairs in divs
        ticker.children().filter("dt").each(function() {

            var dt = $(this),
		    container = $("<div>");

            dt.next().appendTo(container);
            dt.prependTo(container);

            container.appendTo(ticker);
        });

        //hide the scrollbar
        ticker.css("overflow", "hidden");

        //animator function
        function animator(currentItem) {

            //work out new anim duration
            var distance = currentItem.height();
            duration = (distance + parseInt(currentItem.css("marginTop"))) / 0.025;

            //animate the first child of the ticker
            currentItem.animate({ marginTop: -distance }, duration, "linear", function() {

                //move current item to the bottom
                currentItem.appendTo(currentItem.parent()).css("marginTop", 0);

                //recurse
                animator(currentItem.parent().children(":first"));
            });
        };

        //start the ticker
        animator(ticker.children(":first"));

        //set mouseenter
        ticker.mouseenter(function() {

            //stop current animation
            ticker.children().stop();

        });

        //set mouseleave
        ticker.mouseleave(function() {

            //resume animation
            animator(ticker.children(":first"));

        });
    });
</script>

<style type="text/css">
    .style1
    {
        height: 20px;
        text-align: center;
    }
    .main_wrapper #left
    {
        padding-left: 10px;
        padding-top: 15px;
        width: 220px;
        float: left;
    }
    .main_wrapper #right
    {
        width: 790px;
        float: right;
    }
    .box
    {
        border: 1px solid #CCCCCC;
        border-radius: 7px 7px 7px 7px;
        width: 200px;
        margin-left: 6px;
        margin-bottom: 15px;
        background: white;
    }
    .box_main1
    {
        display: inline;
        width: 209px;
    }
    .tit1
    {
        background: #c6a145;
        color: #FFFFFF; /*float: left;*/
        font-weight: bold;
        line-height: 34px;
        width: 100%;
        border-radius: 7px 7px 0 0;
        text-align: center;
    }
    .new-left1
    {
        /* display: inline;*/
        margin-left: 3px;
        padding: 6px 0;
        width: 203px;
    }
    .new-left1 p
    {
        color: Black;
        line-height: 25px;
        padding: 0 9px;
        text-align: left;
    }
    a
    {
        text-decoration: none;
    }
</style>
<div class="box4" style="margin-top: 15px">
    <div class="box_main4">
        <div class="box_pro">
            <div class="main_wrapper">
                <div id="left">
                    <div class="box">
                        <div class="box_main1">
                            <div class="tit1">
                                <asp:Image ID="Image1" runat="server" Style="vertical-align: middle; padding-left: 12px;
                                    padding-right: 8px;" ImageUrl="~/Yumcha/images/shopping_cart.png" />
                                YOUR CART
                            </div>
                            <div class="new-left1">
                                <p style="font-weight: bold; margin-top: 5px">
                                    Quantity :
                                    <asp:Label ID="lbsoluong" runat="server" Text="0" Font-Bold="true"></asp:Label></p>
                                <p style="color: Red; font-weight: bold">
                                    Total Amount :
                                    <asp:Label ID="lblAmout" runat="server" Text="0.00" Font-Bold="true"></asp:Label></p>
                                <p style="text-align: center; font-weight: bold;">
                                    <asp:HyperLink ID="hyGioHang" runat="server" NavigateUrl="~/Yumcha/Shopping_Cart.aspx?keepThis=true&TB_iframe=true&width=700&height=520"
                                        ToolTip="Shopping Cart" CssClass="thickbox"><span style="color: white; border-radius: 8px 0 8px 0; padding: 6px; background: none repeat scroll 0px 0px rgb(198, 161, 69);">View Cart </span></asp:HyperLink></p>
                            </div>
                        </div>
                    </div>
                    <div class="box">
                        <div class="box_main1">
                            <div class="tit1">
                                <asp:Image ID="Image2" runat="server" Style="vertical-align: middle; padding-left: 12px;
                                    padding-right: 8px;" ImageUrl="~/Yumcha/images/cooking_pot.png" />
                                FOOD EVERY DAY
                            </div>
                        </div>
                        <div id="tickerContainer">
                            <dl id="ticker" style="overflow: hidden;">
                                <div style="margin-top: -48px;">
                                    <dt class="heading">News Heading 3</dt><dd class="text">
                                        <asp:Image ID="img1" ImageUrl="~/Yumcha/images/alacarte_03.jpg" runat="server" />
                                    </dd>
                                </div>
                                <asp:Repeater ID="reTicker" runat="server">
                                    <ItemTemplate>
                                        <div style="margin-top: 0px;">
                                            <dt class="heading">
                                                <%#Eval("MenuName")%>
                                                <br />
                                                <span style="font-family: Arial; font-weight: bold; color: Red">
                                                    <%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}")%></span> </dt>
                                            <dd class="text">
                                                <asp:Image ID="Image3" ImageUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/img/ImageMenu/" + Eval("ImageURL") %>'
                                                    runat="server" />
                                            </dd>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </dl>
                        </div>
                    </div>
                </div>
                <div id="right">
                    <div class="box4" style="margin-top: 15px">
                        <div class="box_main4">
                            <div class="box_pro">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td>
                                            <table style="width: 95%">
                                                <asp:ListView ID="lvYumCha" runat="server" GroupItemCount="3" GroupPlaceholderID="layoutTemplate"
                                                    ItemPlaceholderID="groupPlaceholder" 
                                                    OnItemDataBound="lvYumCha_ItemDataBound" 
                                                    onpagepropertieschanged="lvYumCha_PagePropertiesChanged">
                                                    <LayoutTemplate>
                                                        <table id="layoutTemplate" runat="server" border="0" cellpadding="0" cellspacing="0">
                                                        </table>
                                                    </LayoutTemplate>
                                                    <GroupTemplate>
                                                        <tr>
                                                            <div id="groupPlaceholder" runat="server">
                                                            </div>
                                                        </tr>
                                                    </GroupTemplate>
                                                    <ItemTemplate>
                                                        <td style="padding: 0 0 15px 15px;">
                                                            <asp:HyperLink ID="lnkItemDetails" runat="server" NavigateUrl="">
                                                                <div class="productItemStyle" onmouseover="javascript:this.style.background='#e5f4ff';this.style.border='solid 1px #3399cc';"
                                                                    onmouseout="javascript:this.style.background='#FFFFFF';this.style.border='solid 1px #cccccc';this.style.color='#353f45';"
                                                                    price='<%# Eval("Price") %>' matchedprice='0' code='<%# Eval("IDMenu") %>'>
                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td align="center" style="padding: 5px">
                                                                                <table>
                                                                                    <tr>
                                                                                        <tr>
                                                                                            <td align="center" id="rollover">
                                                                                                <a id="A1" rel="lightbox-mygallery" runat="server" title='<%# Eval("MenuName") %>'
                                                                                                    href='<%# "~/ImageProcess.ashx?file=" + "~/Admin/img/ImageMenu/" + Eval("ImageURL")  %>'>
                                                                                                    <asp:Image ID="img" runat="server" ImageUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/img/ImageMenu/" + Eval("ImageURL") + "&width=120&heigh=100&dd=true" %>'
                                                                                                        AlternateText="No Image" />
                                                                                                </a>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="center">
                                                                                                <p>
                                                                                                    <asp:HyperLink ID="hyp" runat="server" Text=' <%# Eval("MenuName") %>'></asp:HyperLink>
                                                                                                </p>
                                                                                                <p>
                                                                                                    <span style="color: #d80e01; font-weight: bold; font-size: 20px">
                                                                                                        <asp:Label ID="lbPrice" runat="server" Text="Label"></asp:Label>
                                                                                                        <%# DataBinder.Eval(Container.DataItem, "Price")%>
                                                                                                    </span>
                                                                                                </p>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="center">
                                                                                            
                                                                                            
                                                                                                <asp:UpdatePanel ID="up1" runat="server">
                                                                                                    <ContentTemplate>
                                                                                                        <table border="0" cellspacing="3" cellpadding="0">
                                                                                                            <tr>
                                                                                                                <td width="1" class="imglink">
                                                                                                                    <asp:HyperLink ID="HyperLink2" runat="server" ToolTip="Add Menu">
                                                                                                                        <asp:ImageButton ID="btnImage" runat="server" CommandName="AddMenu" CommandArgument='<%# Eval("IDMenu") %>'
                                                                                                                            ImageUrl="~/Wedding/images/add-notes.png" Width="32px" Height="32px" OnClick="btnImage_Click" />
                                                                                                                    </asp:HyperLink>
                                                                                                                </td>
                                                                                                            </tr>
                                                                                                        </table>
                                                                                                    </ContentTemplate>
                                                                                                    <Triggers>
                                                                                                        <asp:AsyncPostBackTrigger ControlID="btnImage" EventName="Click" />
                                                                                                    </Triggers>
                                                                                                </asp:UpdatePanel>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </asp:HyperLink>
                                                        </td>
                                                    </ItemTemplate>
                                                </asp:ListView>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr class="paging">
                                        <td class="style1">
                                            <asp:DataPager ID="DataPagerImages" runat="server" PagedControlID="lvYumCha" PageSize="12">
                                                <Fields>
                                                    <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="False" ShowNextPageButton="False"
                                                        ShowPreviousPageButton="False" />
                                                    <asp:NumericPagerField />
                                                    <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="False" ShowNextPageButton="False"
                                                        ShowPreviousPageButton="False" />
                                                </Fields>
                                            </asp:DataPager>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
